local key=KEYS[1]
local value ="";
-- return 11;
key = "*Portal*";
local list=redis.call('keys', key);
for i,v in ipairs(list) do
local result = redis.call('smembers', v);
if tonumber(result[1])>=6 then
-- value = value .. result[1];
value = value .. v;
--redis.call('smembers', v);
--redis.call("DEL", v)
else
end
--value = value .. v;
--return v;
 end
 return value;
-- local age = KEYS[1]
-- if tonumber(age) <13 then
-- print("111")
-- else
-- print("222")
-- end
-- local key1 = KEYS[1]
-- local cursor = "0"
-- local count = 0
-- 
-- repeat
--     local result = redis.call("SCAN", cursor, "MATCH",key1)
--     cursor = result[1]
--     local keys = result[2]
-- 
--     for index, key in ipairs(keys) do
--         count = count + 1
--     end
-- 	return result
-- until cursor == "0"

--return keys
--return count
